//
//  RTJGuidePageController.m
//  RuiTaiJinProject
//
//  Created by jayson on 2018/12/20.
//  Copyright © 2018年 leewei. All rights reserved.
//

#import "RTJGuidePageController.h"
#import "DHGuidePageHUD.h"
#import "RTJTabBarController.h"
#import "RTJHomeController.h"
@interface RTJGuidePageController ()

@end

@implementation RTJGuidePageController

-(void)viewWillAppear:(BOOL)animated{
    
    self.navigationController.navigationBarHidden = YES;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    
//    if (![[NSUserDefaults standardUserDefaults] boolForKey:BOOLFORKEY]) {
//        [[NSUserDefaults standardUserDefaults] setBool:YES forKey:BOOLFORKEY];
//        // 静态引导页
        [self setStaticGuidePage];
        
        // 动态引导页
        // [self setDynamicGuidePage];
        
        // 视频引导页
        // [self setVideoGuidePage];
//    }
    self.navigationController.navigationBarHidden = YES;

    self.view.backgroundColor  = [UIColor whiteColor];
    
    UIImageView *bg_imageView = [[UIImageView alloc] initWithFrame:self.view.frame];
    [bg_imageView setImage:[UIImage imageNamed:@"guideImage_button_backgound"]];
    [self.view addSubview:bg_imageView];
}

#pragma mark - 设置APP静态图片引导页
- (void)setStaticGuidePage {
    
    NSArray *imageNameArray = @[@"ydy_jzy.png",@"ydy_one.png",@"ydy_two.png",@"ydy_three.png"];
    DHGuidePageHUD *guidePage = [[DHGuidePageHUD alloc] dh_initWithFrame:self.view.frame imageNameArray:imageNameArray buttonIsHidden:NO];
    guidePage.slideInto = YES;
    [self.navigationController.view addSubview:guidePage];
    
}

#pragma mark - 设置APP动态图片引导页
- (void)setDynamicGuidePage {
    NSArray *imageNameArray = @[@"guideImage6.gif",@"guideImage7.gif",@"guideImage8.gif"];
    DHGuidePageHUD *guidePage = [[DHGuidePageHUD alloc] dh_initWithFrame:self.view.frame imageNameArray:imageNameArray buttonIsHidden:YES];
    guidePage.slideInto = YES;
    [self.navigationController.view addSubview:guidePage];
    
   
}

#pragma mark - 设置APP视频引导页
- (void)setVideoGuidePage {
    NSURL *videoURL = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"guideMovie1" ofType:@"mov"]];
    DHGuidePageHUD *guidePage = [[DHGuidePageHUD alloc] dh_initWithFrame:self.view.bounds videoURL:videoURL];
    [self.navigationController.view addSubview:guidePage];
}


@end
